// 2013-9-12上午02:25:26  net.betou.trade.main.manager.agencyorproxy.ProxyMng.java

package net.betou.trade.main.manager.agencyorproxy;

import java.util.List;

import net.betou.common.page.Pagination;
import net.betou.trade.entity.main.AgentAndAdmins;
import net.betou.trade.entity.main.AgentAndAdminsExt;

/**
 * 
 * @author 叶装装
 */
public interface ProxyMng{

	/**
	 * 查找代理商
	 * @param admin
	 * @param searchProperty
	 * @param searchValue
	 * @param orderProperty
	 * @param orderDirection
	 * @param pageNo
	 * @param pageSize
	 * @param filterStatus
	 * @return
	 */
	public Pagination getPage( AgentAndAdmins admin, String searchProperty, String searchValue, String orderProperty, String orderDirection, int pageNo, int pageSize, String filterStatus );
	
	/**
	 * 查找所有代理商的手机号码, 该方法被发送短信时使用
	 * @return
	 */
	public List< String > getMobileList( AgentAndAdmins admin ); 
	
	/**
	 * 查找机构
	 * @param id
	 * @return
	 */
	public AgentAndAdmins findProxy( Integer id );
	
	/**
	 * 查找自己的机构
	 * @param admin
	 * @param id
	 * @return
	 */
	public AgentAndAdmins findBySelf( AgentAndAdmins admin, Integer id );
	
	/**
	 * 根据ID查找
	 * @param id
	 * @return
	 */
	public AgentAndAdmins findById( Integer id );
	
	/**
	 * 根据ID删除
	 * @param ids
	 * @return
	 */
	public AgentAndAdmins [ ] deleteByIds( Integer [ ] ids );
	
	/**
	 * 保存
	 * @param currentAdmin
	 * @param ip
	 * @param bean
	 * @param ext
	 * @return
	 */
	public AgentAndAdmins save( AgentAndAdmins admin, String ip, AgentAndAdmins bean, AgentAndAdminsExt ext, String [ ] pic );
	
	/**
	 * 更新
	 * @param disabled
	 * @param password
	 * @param email
	 * @param mobile
	 * @param intermediaName
	 * @param bean
	 * @param ext
	 * @param roleIds
	 * @param pic
	 * @param picIds
	 * @return
	 */
	public AgentAndAdmins update( Boolean disabled, String password, String email, String mobile, String intermediaName, AgentAndAdmins bean, AgentAndAdminsExt ext, Integer [] roleIds, String [ ] pic, Integer [ ] picIds );

	/**
	 * 根据名称查找
	 * @param intermediaName
	 * @return
	 */
	public AgentAndAdmins findByIntermediaName( String intermediaName );
}
